package cn.edu.sjtu.se.dslab.util;

import java.text.SimpleDateFormat;
import java.util.Date;

public class DateUtil {
	public static final String COMMON_DATE_PATTERN = "yyyyMMddHHmmssSSS";
	private static SimpleDateFormat formatter;
	
	
	//format is yyyyMMddHHmmssZ
	public static synchronized String getDateAsFileNameString(String pattern){
		formatter = new SimpleDateFormat(pattern);
		return formatter.format( new Date());
	}
}
